package com.sop.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sop.dao.WatchChangeRecordDao;
import com.sop.model.WatchChangeRecord;
import com.sop.model.vo.WatchChangeRecordVo;
import com.sop.service.WatchChangeRecordService;

import common.base.service.BaseServiceImpl;

@Service("watchChangeRecordService")
@Transactional
public class WatchChangeRecordServiceImpl extends BaseServiceImpl<WatchChangeRecord,WatchChangeRecordVo> implements WatchChangeRecordService{

	
	@Autowired
	private  WatchChangeRecordDao  watchChangeRecordDao;
	
	@Resource(name="watchChangeRecordDao")
	public void setBaseDao(WatchChangeRecordDao  watchChangeRecordDao){
		super.setBaseDao(watchChangeRecordDao);
	}
	
	@Override
	public Boolean deleteBatch(List<Integer> ids) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public WatchChangeRecord add(WatchChangeRecord entity) {
		watchChangeRecordDao.save(entity);
		return get(entity.getId());
	}

	@Override
	public WatchChangeRecord update(WatchChangeRecord entity) {
		watchChangeRecordDao.update(entity);
		return get(entity.getId());
	}

}
